$OpenBSD: patch-src_sthreads_c,v 1.2 2016/11/10 10:10:50 gsoares Exp $
--- src/sthreads.c.orig	Sat Oct 29 05:25:37 2016
+++ src/sthreads.c	Wed Nov  9 20:22:39 2016
@@ -47,7 +47,7 @@
 STUNNEL_RWLOCK stunnel_locks[STUNNEL_LOCKS];
 #endif
 
-#if OPENSSL_VERSION_NUMBER<0x10100004L
+#if OPENSSL_VERSION_NUMBER<0x10100004L || defined(LIBRESSL_VERSION_NUMBER)
 #define CRYPTO_THREAD_lock_new() CRYPTO_get_new_dynlockid()
 #endif
 
